package com.fish.yssb;

public class Consts {

    public static final boolean DEBUG_MODE = false;
    public static Boolean isRealSQ = false;

    //CMCC ONKEY LOGIN
    public static final String toprk1 = "设备信息读取";
    public static final String toprk2 = "实时数据查询";
    public static final String toprk3 = "定值参数";
    public static final String toprk4 = "历史记录";
    public static final String toprk5 = "故障录波";
    public static final String toprk6 = "时间同步";
    public static final String toprk7 = "控制传动";
    public static final String toprk8 = "终端app升级";
    public static final String toprk9 = "终端重启";
    public static final String toprk10 = "终端调试";
    public static final String toprk11 = "故障诊断";
    public static final String toprk12 = "终端重启";


    public static final String[] userType = {"管理员","游客"};
    //Prefence 使用key值
    public static final String Prefence_initData = "Prefence_initData";
    public static final String Prefence_User_info = "Prefence_User_info";


    //命令执行状态
    public static final int cm_init = 0; //初始化
    public static final int cm_start = 1; //开始执行
    public static final int cm_end = 2;//执行完毕
    public static final int cm_timeout = -1;//执行超时

    //命令分类
    public static final int cm_systime = 1000; //时间同步
    public static final int cm_updatever = 1001; //版本更新
//    public static final int cm_setConstsPar = 1002; //设置定值参数

    public static final int cm_writesq = 1003; //设备信息读取
    public static final int cm_r_const_para = 1004; //定值参数读取
    public static final int cm_w_const_para = 1005; //定值参数下装
    public static final int cm_r_real_para = 1006; //实时数据查询
    public static final int cm_his_list = 1007; //历史数据列表
    public static final int cm_his_filedown = 1008; //历史文件下载
    public static final int cm_r_ctrl = 1009; //控制状态读取
    public static final int cm_r_sub_ctrl = 1010; //读取预制/执行
    public static final int cm_w_ctrl = 1011; //发预制命令
    public static final int cm_w_ctrl_2 = 1012; //发执行命令


    public static String getTypeString(int type)
    {
        String strType = "";
        switch ( type)
        {
            case Consts.cm_systime:
                strType = "时间同步";
                break;
            case Consts.cm_updatever:
                strType = "app更新";
                break;
            case Consts.cm_w_const_para:
                strType = "定值参数下装";
                break;
            case Consts.cm_writesq:
                strType = "设备信息读取";
                break;
            case Consts.cm_r_const_para:
                strType = "定值参数读取";
                break;
            case Consts.cm_r_real_para:
                strType = "实时数据查询";
                break;
            case Consts.cm_his_list:
                strType = "历史记录列表";
                break;
            case Consts.cm_his_filedown:
                strType = "历史文件下载";
                break;
            case Consts.cm_r_ctrl:
                strType = "设置定值参数";
                break;
            case Consts.cm_r_sub_ctrl:
                strType = "读取预制/执行";
                break;
            case Consts.cm_w_ctrl:
                strType = "发预制/执行命令";
                break;
            default:
                strType = "未知";
                break;
        }
        return  strType;
    }

    public static String getRetString(int status)
    {
        String strType = "";
        switch ( status)
        {
            case Consts.cm_init:
                strType = "初始化";
                break;
            case Consts.cm_start:
                strType = "开始执行";
                break;
            case Consts.cm_end:
                strType = "执行完毕" ;
                break;
            case Consts.cm_timeout:
                strType = "执行超时" ;
                break;
            default:
                strType = "未知";
                break;
        }
        return  strType;
    }
}
